<?php defined('IN_IA') or exit('Access Denied');?><style type="text/css">
.mui-popup-backdrop{z-index:1009!important;}
.marketing-popover{ background:#f7f7f7!important; height:80%;}
.marketing-popover .mui-popover-content{ height:85%;}
.marketing-popover .mui-scroll-wrapper{ margin-bottom:0;}
.marketing-popover .mui-table-view{text-align:left!important;color:rgb(102, 102, 102)!important;}
.marketing-popover .mui-table-view li{border-radius:0!important;}
.marketing-popover .mui-table-view li:last-child:after{ height:0;}
.marketing-popover .mui-table-view li.noselect{color:#333!important;background-color:#eaeaea!important;}
.marketing-popover .mui-table-view li a{border-radius:0!important;}
.marketing-popover .mui-input-group:before{ height:0;}
.marketing-popover .mui-input-row{ background:none!important;}
.marketing-popover .mui-input-row:last-child:after{ height:0;}
.marketing-popover .mui-input-row label{ float:left!important; line-height:1}
#marketing_1 span.mui-badge-orange.mui-badge-outlined{left:-10px;}
#marketing_1 span.mui-badge-orange.mui-badge-outlined:before{border-radius:100px;}
#marketing_1 span.mui-badge-orange.mui-badge-outlined~span{padding-left:0;}
#storelist .mui-table-view .mui-media-body{position:relative;width:100%;overflow:initial;}
#storelist .closesttome{display:none;}
</style>
<?php  if(!empty($marketing)) { ?>
<div id="marketing" class="mui-popover mui-popover-bottom mui-popover-action marketing-popover">
    <div class="mui-popover-header">主办方优惠</div>
    <div class="mui-popover-content">
    	<div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <?php  if($_GPC['ac']=='join') { ?>
            <div class="mui-input-group">
                <?php  if(!empty($marketing['0'])) { ?>
                <?php  if(is_array($marketing['0'])) { foreach($marketing['0'] as $key => $v) { ?>
                <div class="mui-input-row js-marketlist mui-checkbox<?php  if($afterMarketing['max']!=$v['meet'] || $afterMarketing['m']!=1) { ?> mui-disabled<?php  } ?>" data-meet="<?php  echo $v['meet'];?>" data-type="1">
                    <label>折扣券：满<?php  echo $v['meet'];?>名，可享 <?php  echo $v['give'];?> 折</label>
                    <input name="give" value="<?php  echo $v['give'];?>" type="checkbox"<?php  if($afterMarketing['max']==$v['meet'] && $afterMarketing['m']==1) { ?> checked disabled<?php  } else { ?> disabled<?php  } ?>>
                </div>
                <?php  } } ?>
                <?php  } else { ?>
                <?php  if(is_array($marketing['1'])) { foreach($marketing['1'] as $key => $v) { ?>
                <div class="mui-input-row js-marketlist mui-checkbox<?php  if($afterMarketing['max']!=$v['meet'] || $afterMarketing['m']!=2) { ?> mui-disabled<?php  } ?>" data-meet="<?php  echo $v['meet'];?>" data-type="2">
                    <label>满减：省<?php  echo $v['give'];?>元，满<?php  echo $v['meet'];?>名可使用</label>
                    <input name="give" value="<?php  echo $v['give'];?>" type="checkbox"<?php  if($afterMarketing['max']==$v['meet'] && $afterMarketing['m']==2) { ?> checked disabled<?php  } else { ?> disabled<?php  } ?>>
                </div>
                <?php  } } ?>
                <?php  } ?>
                <?php  if(!empty($marketing['2'])) { ?>
                <?php  if(is_array($marketing['2'])) { foreach($marketing['2'] as $v) { ?>
                <div class="mui-input-row mui-checkbox<?php  if($_W['member']['groupid'] != $v['groupid']) { ?> mui-disabled<?php  } ?>">
                <?php  if($v['discount']) { ?>
                    <label>VIP <?php  echo $v['grouptitle'];?> 专享：<?php  echo $v['discount'];?> 折</label>
                    <input name="discount" value="<?php  echo $v['discount'];?>" type="checkbox"<?php  if($_W['member']['groupid'] != $v['groupid']) { ?> disabled<?php  } else { ?> checked disabled<?php  } ?>>
                <?php  } else { ?>
                	<label>VIP <?php  echo $v['grouptitle'];?> 专享：立减 <?php  echo $v['money'];?> 元</label>
                    <input name="money" value="<?php  echo $v['money'];?>" type="checkbox"<?php  if($_W['member']['groupid'] != $v['groupid']) { ?> disabled<?php  } else { ?> checked disabled<?php  } ?>>
                <?php  } ?>
                </div>
                <?php  } } ?>
                <?php  } ?>
            </div>
            <?php  } else { ?>
            <ul class="mui-table-view mui-afterbefore-no">
                <?php  if(!empty($marketing['0'])) { ?>
                <?php  if(is_array($marketing['0'])) { foreach($marketing['0'] as $key => $v) { ?>
                <li class="mui-table-view-cell">折扣券：<?php  echo $v['give'];?> 折<span class="mui-badge mui-badge-inverted">单次报名满<?php  echo $v['meet'];?>人:可使用</span></li>
                <?php  } } ?>
                <?php  } else { ?>
                <?php  if(is_array($marketing['1'])) { foreach($marketing['1'] as $key => $v) { ?>
                <li class="mui-table-view-cell">满减：省 <?php  echo $v['give'];?> 元<span class="mui-badge mui-badge-inverted">单次报名满<?php  echo $v['meet'];?>人:可使用</span></li>
                <?php  } } ?>
                <?php  } ?>
                <?php  if(!empty($marketing['2'])) { ?>
                <?php  if(is_array($marketing['2'])) { foreach($marketing['2'] as $key => $v) { ?>
                <?php  if($v['discount']) { ?>
                <li class="mui-table-view-cell">折扣券：<?php  echo $v['discount'];?> 折<span class="mui-badge mui-badge-inverted">VIP <?php  echo $v['grouptitle'];?> 专享</span></li>
                <?php  } else { ?>
                <li class="mui-table-view-cell">立减券：省 <?php  echo $v['money'];?> 元<span class="mui-badge mui-badge-inverted">VIP <?php  echo $v['grouptitle'];?> 专享</span></li>
                <?php  } ?>
                <?php  } } ?>
                <?php  } ?>
            </ul>
            <?php  } ?>
        </div>
        </div>
    </div>
    <div class="mui-bar mui-bar-footer">
        <button type="button" class="mui-btn mui-btn-orange mui-btn-block js-close" data-popover="marketing">完成</button>
    </div>
</div>
<?php  } ?>
<?php  if(($activity['prize']['credit'] || $activity['prize']['share_credit'] || $activity['prize']['sign_credit']) && $_GPC['ac']!='join') { ?>
<div id="marketing_1" class="mui-popover mui-popover-bottom mui-popover-action marketing-popover">
	<div class="mui-popover-header">积分奖励</div>
    <div class="mui-popover-content">
    	<div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view mui-afterbefore-no market-box">
                <?php  if($activity['prize']['credit']) { ?><li class="mui-table-view-cell"><span class="mui-badge-orange mui-badge-outlined<?php  if(!strpos($_SERVER['HTTP_USER_AGENT'], 'Mac OS X')) { ?> android<?php  } ?>">报名</span><span>可得 <?php  echo $activity['prize']['credit'];?> 积分</span></li><?php  } ?>
                <?php  if($activity['prize']['share_credit']) { ?><li class="mui-table-view-cell"><span class="mui-badge-orange mui-badge-outlined<?php  if(!strpos($_SERVER['HTTP_USER_AGENT'], 'Mac OS X')) { ?> android<?php  } ?>">分享</span><span>可得 <?php  echo $activity['prize']['share_credit'];?> 积分</span></li><?php  } ?>
                <?php  if($activity['prize']['sign_credit']) { ?><li class="mui-table-view-cell"><span class="mui-badge-orange mui-badge-outlined<?php  if(!strpos($_SERVER['HTTP_USER_AGENT'], 'Mac OS X')) { ?> android<?php  } ?>">签到</span><span>可得 <?php  echo $activity['prize']['sign_credit'];?> 积分</span><span class="mui-badge mui-badge-inverted">活动日期现场有效</span></li><?php  } ?>
            </ul>
        </div>
        </div>
    </div>
    <div class="mui-bar mui-bar-footer">
        <button type="button" class="mui-btn mui-btn-orange mui-btn-block js-close" data-popover="marketing_1">完成</button>
    </div>
</div>
<?php  } ?>
<?php  if($_GPC['ac']!='join') { ?>
<div id="storelist" class="mui-popover mui-popover-left">
	<div class="mui-popover-header">适用场地<a href="#storelist" class="mui-pull-right mui-popover-close"><me class="mui-icon mui-icon-closeempty"></me></a></div>
    <div class="mui-popover-content" style="height:95%">
    	<div class="mui-scroll-wrapper">
        <div class="mui-scroll">
        	<div class="list-content"></div>
        </div>
        </div>
    </div>
</div>
<?php  } ?>
<script>
mui('.mui-scroll-wrapper').scroll();
//触发规格选择器
$('body').delegate('.js-popover','tap',function(e) {
	var popover = "#"+$(this).data("popover");
	mui(popover).popover('toggle');
});
$(".js-close").on("tap",function(e) {
	var popover = "#"+$(this).data("popover");
	mui(popover).popover('hide');
});
</script>